this.workspacesView = null;
this._inDrag = false;
+ this._cancelledDrag = false;
this._zoomOut = false;
this._zoomFraction = 0;
this._itemDragBeginId = 0;
this._itemDragEndId = 0;
this._windowDragBeginId = 0;
+ this._windowDragCancelledId = 0;
this._windowDragEndId = 0;
},
if (this._windowDragBeginId == 0)
this._windowDragBeginId = Main.overview.connect('window-drag-begin',
Lang.bind(this, this._dragBegin));
+ if (this._windowDragCancelledId == 0)
+ this._windowDragCancelledId = Main.overview.connect('window-drag-cancelled',
+ Lang.bind(this, this._dragCancelled));
if (this._windowDragEndId == 0)
this._windowDragEndId = Main.overview.connect('window-drag-end',
Lang.bind(this, this._dragEnd));
Main.overview.disconnect(this._windowDragBeginId);
this._windowDragBeginId = 0;
}
+ if (this._windowDragCancelledId > 0) {
+ Main.overview.disconnect(this._windowDragCancelledId);
+ this._windowDragCancelledId = 0;
+ }
if (this._windowDragEndId > 0) {
Main.overview.disconnect(this._windowDragEndId);
this._windowDragEndId = 0;
if (Main.overview.animationInProgress)
return;
- let shouldZoom = this._controls.hover || this._inDrag;
+ let shouldZoom = this._controls.hover || (this._inDrag && !this._cancelledDrag);
if (shouldZoom != this._zoomOut) {
this._zoomOut = shouldZoom;
this._updateWorkspacesGeometry();
_dragBegin: function() {
this._inDrag = true;
+ this._cancelledDrag = false;
+ this._updateZoom();
+ },
+
+ _dragCancelled: function() {
+ this._cancelledDrag = true;
this._updateZoom();
},